<template>
    <div>
        <Header></Header>
        <router-view></router-view>
        <Footer v-show="$route.meta.show"></Footer>
    </div>
</template>

<script>
    import Header from '@/components/Header'
    import Footer from '@/components/Footer'
    import {
        reqCategoryList
    } from './api'
    export default {
        name: 'App',
        components: {
            Header,
            Footer
        },
        created() {
            //派发获取列表的请求,放在APP组件中可以用来减少网络请求
            this.$store.dispatch('getCategory');
        }
    }
</script>

<style>

</style>